<!--
 * @Author: cjy
 * @Date: 2020-09-16 14:51:11
 * @LastEditors: Please set LastEditors
 * @Descripttion: 
 * @LastEditTime: 2022-06-01 10:28:40
 * @FilePath: \vue-openlayers-demos\src\views\firstMap\FirstMap.vue
-->
<template>
  <div id="app">
    <div class="backround">
      <!-- <iframe src="https://cn.bing.com/?scope=web" frameborder="0" width="800px" height="900px" id="iFrame"
          ref="iframes"
          class="workbench-iframe"
          ></iframe> -->
          
          <iframe src="https://sk-rscp.ygwjg.com/management/project/common?pid=251977&resourceid=251977&code=adgq0001&type=10&token=eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.YGTVfiqogLR_JWCRTbXW92K6tdkP9m44F12j6aK_1PDEoptKgN2KfQtvnFj-7RQoL3jJkEc6_6Y4_0XmWPI5QfvkQn2I01iCFUOqYWCWatr0Z1i7vJ2nAlZdekgSSep-lyL2QpLUyHXV1HfvQyFx-kZnarnYy_fZWP0GKSA67Iw._YLQBykd8TpqzNh3.PfDzaLi0h4ucHSXq7ao9A5F5aF6PL7uc5s-U" frameborder="0" width="800px" height="900px" id="iFrame"
          ref="iframes"
          class="workbench-iframe"
          @load="iframeLoad"
          ></iframe>

          <!-- <iframe src="http://118.31.164.136/memorylog/" frameborder="0" width="800px" height="900px" id="iFrame"
          ref="iframes"
          class="workbench-iframe"
          @load="iframeLoad"
          ></iframe> -->

          <!-- <iframe src="http://localhost:8081/scaleLine" frameborder="0" width="800px" height="900px" id="iFrame"
          ref="iframes"
          class="workbench-iframe"
          @load="iframeLoad"
          ></iframe> -->
          
    </div>
  </div>
</template>


<script>
export default {
  data() {
    return {
      iframeWin: {}
    };
  },
  computed: {
  },
  mounted(){
    this.$nextTick(() => {
      const iframe = window.frames['iFrame']
      console.log(iframe, "iframe====================");
      // const Do = (iframe.contentWindow || iframe.contentDocument)
      // console.log(Do.document.getElementById('csdn-toolbar'), "Do.document.getElementsByClassName('toolbar-inside')");
      // Do.document.getElementsByClassName('toolbar-inside')[0].style.display = 'none'
      const handleLoad = () => {
        setTimeout(() => {
          const Do = (iframe.contentWindow || iframe.contentDocument)
          // Do.document.getElementsByClassName('toolbar-inside')[0].style.display = 'none'
          console.log(Do.document.getElementById('nav'), "Do.document.getElementsByClassName('toolbar-inside')");
          Do.document.getElementById('nav').style.display = 'none'
        }, 500)
      }
      iframe.addEventListener('load', handleLoad, true)
    })
  },
  methods: {
    iframeLoad(){

      // const iframe = window.frames['iFrame']
      // console.log(iframe, "iframe====================");
      // const Do = (iframe.contentWindow || iframe.contentDocument)
      // console.log(Do.document.getElementById('nav'), "Do.document.getElementsByClassName('toolbar-inside')");
      // Do.document.getElementById('nav').style.display = 'none'
    }
  }
};
</script>
<style lang="scss" scoped>
.backround {
  width: 100%;
  height: 100vh;
  background: #666;
}

</style>
